package thd;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class Bank {
	private Lock bankLock=new ReentrantLock();
	
	public void transfer(int from,int to ,int amount) {
		bankLock.lock();
		try {
			System.out.println(Thread.currentThread());
			
		} finally {
			bankLock.unlock();
			// TODO: handle finally clause
		}
	}
}
